<%-- 
    Document   : searchForm
    Created on : 06-03-2012, 11:13:04
    Author     : Xe Bay
--%>

<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.OutputKeys"%>
<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.TransformerFactory"%>
<%@page import="javax.xml.transform.stream.StreamResult"%>
<%@page import="java.io.File"%>
<%@page import="javax.xml.transform.stream.StreamSource"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml"  prefix="x" %>

<script type="text/javascript" src="script/search.js"></script>
<script type="text/javascript">
    <c:import url="xml/khuvuc.xml" var="xmlKhuvuc" charEncoding="UTF-8"/>
        var textOfKhuVuc='${xmlKhuvuc}';
        var khuvucDoc = stringtoXML(textOfKhuVuc);
    <c:import url="xml/dsLoaiTin.xml" var="xmlLoaiTin" charEncoding="UTF-8"/>
        var textOfDsLoaiTin='${xmlLoaiTin}';
        var dsLoaiTinDoc = stringtoXML(textOfDsLoaiTin);
    <c:import url="xml/dsLoaiNha.xml" var="xmlLoaiNha" charEncoding="UTF-8"/>
        var textOfDsLoaiNha='${xmlLoaiNha}';
        var dsLoaiNhaDoc = stringtoXML(textOfDsLoaiNha);
    <c:import url="xml/dsLoaiGiayTo.xml" var="xmlLoaiGiayTo" charEncoding="UTF-8"/>
        var textOfDsLoaiGiayTo='${xmlLoaiGiayTo}';
        var dsLoaiGiayToDoc = stringtoXML(textOfDsLoaiGiayTo);
    <c:import url="xml/dsDonViTienTe.xml" var="xmlDonViTienTe" charEncoding="UTF-8"/>
        var textOfDsDonViTienTe='${xmlDonViTienTe}';
        var dsLoaiDonViTienTe = stringtoXML(textOfDsDonViTienTe);
</script>

<div id="content">
    <form name="searchForm">
        <div class="box">
            <div style="border:1px solid black; padding-left:20px; padding-bottom:10px; padding-top:10px ">
                <center>
                    <h3>Tìm Kiếm</h3><br/>
                </center>
                <table border="0">
                    <tr >
                        <td width="10"></td>
                        <td>
                            Loại tin:
                        </td>
                        <td>
                            <c:import url="xsl/dsLoaiTin.xsl" var="xslLoaiTin" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlLoaiTin}" xslt="${xslLoaiTin}" />
                        </td>
                        <td width="40"></td>
                        <td colspan="3">
                            Khu vực:
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            Loại nhà:
                        </td>
                        <td>
                            <c:import url="xsl/dsLoaiNhaSearch.xsl" var="xslLoaiNha" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlLoaiNha}" xslt="${xslLoaiNha}" />
                        </td>
                        <td></td>
                        <td width="10"></td>
                        <td width="30">Tỉnh/Thành</td>

                        <td>

                            <c:import url="xsl/khuvucsearch.xsl" var="xslKhuvuc" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlKhuvuc}" xslt="${xslKhuvuc}" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            Loại giấy tờ:
                        </td>
                        <td>
                            <c:import url="xsl/dsLoaiGiayToSearch.xsl" var="xslLoaiGiayTo" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlLoaiGiayTo}" xslt="${xslLoaiGiayTo}" />
                        </td>
                        <td></td>
                        <td width="10"></td>
                        <td width="30">Quận/Huyện</td>

                        <td>
                            <c:import url="xsl/quanhuyensearch.xsl" var="xslQuanhuyen" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlKhuvuc}" xslt="${xslQuanhuyen}" />
                        </td>

                    </tr>
                    <tr>
                        <td></td>
                        <td>Giá tiền:</td>
                        <td colspan="5">
                            <input id="txtSearchGiaTienFrom" type="text" name="txtSearchGiaTienFrom" value="" style="width: 90px"
                                   onblur="trimString('txtSearchGiaTienFrom');" onchange="changeKeySearch();"/>
                            ~
                            <input id="txtSearchGiaTienTo" type="text" name="txtSearchGiaTienTo" value="" style="width: 90px"
                                   onblur="trimString('txtSearchGiaTienTo')" onchange="changeKeySearch();"/>

                            <c:import url="xsl/dsDonViTienTeSearch.xsl" var="xslDonViTienTe" charEncoding="UTF-8"/>
                            <x:transform xml="${xmlDonViTienTe}" xslt="${xslDonViTienTe}" />
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>Hiển thị kết quả theo: </td>
                        <td colspan="3">
                            <select id="ddl_search_orderby_Key" name="search_orderby_Key">
                                <option value="Time">Thông tin mới nhất</option>
                                <option value="Turn">Xem nhiều nhất</option>
                            </select>
                            <input type="button" id="btn_Search" name="btn_Search" value="Search" onclick="mainsearch(0)"/>
                            <input type="hidden" id="bSearching" value="false"/>
                            <input type="hidden" id="bchangeKeySearch" value="false"/>
                            <input type="hidden" id="numOfPageSearch" value="0"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</div>